<?php
header('Location:http://www.mangse.com/');
	get_header();
?>
<div id="content" class="content">
	<div id="innerContent">
	<div class="textbox">
			<div class="textbox_header"></div>
		<div class="textbox_inner">
		<?php if (is_author()): ?>
				<div class="textbox-title">
					<h1 class="pagetitle">
					<?php echo get_avatar(get_the_author_meta('user_email',$author),'64');?>
					<?php echo walleve_the_user_level($author);?> | <?php the_author_meta('display_name',$author);?></h1>
					<h2 class="post_info"> 
						  <div class="post_info_left">
							<span>
							[<a href="<?php echo get_author_posts_url($author); ?>" title="查看TA发表的文章">文章<?php echo get_usernumposts($author);?>篇</a>]
							[<a href="<?php echo get_page_url('comment').'?m='.get_the_author_meta('user_login',$author); ?>" title="查看评论">评论<?php echo get_usernumcomments($author);?>条</a>]
							<?php if(get_the_author_meta('user_url',$author)){?>
							[<a href="<?php the_author_meta('user_url',$author);?>" target="_blank">主页</a>]
							<?php }?>
							</span>
						  </div>
					</h2>
				</div>
				<div class="textbox-content article-content">
					<p>
					<?php if(get_the_author_meta('description',$author)){
						the_author_meta('description',$author);
					}?>
					</p>
				</div>
			<?php endif;?>
				</div>
			<div class="textbox_footer"></div>
		</div>	
		<?php if (have_posts()) : ?>
		<div class="textbox">
					<div class="textbox_header"></div>
				<div class="textbox_inner">
		                <div class="textbox-title">
						 <?php while (have_posts()) : the_post(); ?>
										<h1 class="postlist" id="post-<?php the_ID(); ?>">
										<span>
										<?php comments_popup_link(__('看法', 'kubrick'), __('1个看法', 'kubrick'), __('%个看法', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
										<?php the_time(__('F jS, Y', 'kubrick')) ?>
									</span>
									<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a>
									</h1>
							<?php endwhile; ?>
							</div>
						</div>
					<div class="textbox_footer"></div>
		</div>
		<?php else: ?>
		<div class="textbox">
			<div class="textbox_header"></div>
			<div class="textbox_inner">
                <div class="textbox-title">
                    <h1>暂无内容</h1>
                </div>
                <div class="textbox-content article-content">
	                <div>
					<?php get_search_form(); ?>
	                </div>
                </div>
			</div>
			<div class="textbox_footer"></div>
		</div>
		<?php endif; ?>
		
				<div class="article-bottom" style="display: block">
					<div class="pages">
							<span class="pagebar-selections">
							<div id="pagenavi">
								<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
							</div>
							</span>
					</div>
				</div>
			
	</div>
</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>